package org.waddy.framework.pub.dao;

import org.waddy.framework.app.exception.AppException;
import org.waddy.framework.app.exception.SysException;
import org.waddy.framework.app.model.dao.IDAO;


public interface IMaxIdDAO extends IDAO {
	/**
	 * 获取sequence的值，如*****_SEQ
	 * @param seqName
	 * @return
	 * @throws SysException
	 * @throws AppException
	 */
	public String getSequenceNextVal(String seqName) throws SysException,
			AppException;

	/**
	 * 获取sequence的值，如*****_SEQ
	 * @param seqName
	 * @return
	 * @throws SysException
	 * @throws AppException
	 */
	public Long getSequenceNextVal4Long(String seqName) throws SysException,
			AppException;
	
	/**
	 * getMaxIdFromTable:从某表中根据条件得到指定字段的最大值
	 * @param tableName
	 * @param columnName
	 * @param condition
	 * @return
	 * @throws SysException
	 * @throws AppException
	 */
	public Long getMaxIdFromTable(String tableName, String columnName,
			String condition) throws SysException, AppException;
	
	
}
